package com.ruoyi.mobile.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mobile.mapper.HuaweiHealthDetailMapper;
import com.ruoyi.mobile.domain.HuaweiHealthDetail;
import com.ruoyi.mobile.service.IHuaweiHealthDetailService;

/**
 * 华为健康详情数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-23
 */
@Service
public class HuaweiHealthDetailServiceImpl implements IHuaweiHealthDetailService 
{
    @Autowired
    private HuaweiHealthDetailMapper huaweiHealthDetailMapper;

    /**
     * 查询华为健康详情数据
     * 
     * @param id 华为健康详情数据主键
     * @return 华为健康详情数据
     */
    @Override
    public HuaweiHealthDetail selectHuaweiHealthDetailById(Integer id)
    {
        return huaweiHealthDetailMapper.selectHuaweiHealthDetailById(id);
    }

    /**
     * 查询华为健康详情数据列表
     * 
     * @param huaweiHealthDetail 华为健康详情数据
     * @return 华为健康详情数据
     */
    @Override
    public List<HuaweiHealthDetail> selectHuaweiHealthDetailList(HuaweiHealthDetail huaweiHealthDetail)
    {
        return huaweiHealthDetailMapper.selectHuaweiHealthDetailList(huaweiHealthDetail);
    }

    /**
     * 新增华为健康详情数据
     * 
     * @param huaweiHealthDetail 华为健康详情数据
     * @return 结果
     */
    @Override
    public int insertHuaweiHealthDetail(HuaweiHealthDetail huaweiHealthDetail)
    {
        huaweiHealthDetail.setCreateTime(DateUtils.getNowDate());
        return huaweiHealthDetailMapper.insertHuaweiHealthDetail(huaweiHealthDetail);
    }

    /**
     * 修改华为健康详情数据
     * 
     * @param huaweiHealthDetail 华为健康详情数据
     * @return 结果
     */
    @Override
    public int updateHuaweiHealthDetail(HuaweiHealthDetail huaweiHealthDetail)
    {
        huaweiHealthDetail.setUpdateTime(DateUtils.getNowDate());
        return huaweiHealthDetailMapper.updateHuaweiHealthDetail(huaweiHealthDetail);
    }

    /**
     * 批量删除华为健康详情数据
     * 
     * @param ids 需要删除的华为健康详情数据主键
     * @return 结果
     */
    @Override
    public int deleteHuaweiHealthDetailByIds(Integer[] ids)
    {
        return huaweiHealthDetailMapper.deleteHuaweiHealthDetailByIds(ids);
    }

    /**
     * 删除华为健康详情数据信息
     * 
     * @param id 华为健康详情数据主键
     * @return 结果
     */
    @Override
    public int deleteHuaweiHealthDetailById(Integer id)
    {
        return huaweiHealthDetailMapper.deleteHuaweiHealthDetailById(id);
    }
}
